<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
//  import 'static/config/app-config.js';
/* eslint-disable linebreak-style,semi,linebreak-style,linebreak-style */
import * as getUser from "@/pages/search/api/user.js";
import authority from "static/js/authority.js";
export default {
  name: "APP",
  mounted() {
    //获取权限方法
    var userInfo = authority.getAuthority();
    var token_type = localStorage.getExpire("token_type");
    var access_token = localStorage.getExpire("access_token");
    if (userInfo == null || token_type == null || access_token == null) {
      this.$message({
        message: "你还没有登录",
        type: "error"
      });
      setTimeout(function() {
        top.location.href = loginPageUrl;
      }, 2500);
    }
  }
};
</script>

<style lang="scss">
@import "../../styles/rule.scss";
html,
body,
#app {
  font-family: $fontFamily;
  font-size: 10px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  user-select: none;
}
//这是自定义loading区域的样式，当然，你可以随意修改，我这个是仿照ElementUI的样式进行设置的
.customLoading {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading {
  width: 80px;
  height: 40px;
  margin: 0 auto;
  margin-top: 100px;
}
.loading span {
  display: inline-block;
  width: 8px;
  height: 100%;
  border-radius: 4px;
  background: lightgreen;
  -webkit-animation: load 1s ease infinite;
}
@-webkit-keyframes load {
  0%,
  100% {
    height: 40px;
    background: lightgreen;
  }
  50% {
    height: 70px;
    margin: -15px 0;
    background: lightblue;
  }
}
.loading span:nth-child(2) {
  -webkit-animation-delay: 0.2s;
}
.loading span:nth-child(3) {
  -webkit-animation-delay: 0.4s;
}
.loading span:nth-child(4) {
  -webkit-animation-delay: 0.6s;
}
.loading span:nth-child(5) {
  -webkit-animation-delay: 0.8s;
}
</style>
